
<script>
//打印

$('report').addEvent('click',function(){
    var begin_date = $('paybegin_date').get('value');
    var begin_date_objh =document.getElementsByName("_DTIME_[H][paybegin_date]")[0]; 
    var begin_date_h = begin_date_objh.options[begin_date_objh.selectedIndex].value; 
    var begin_date_objm =document.getElementsByName("_DTIME_[M][paybegin_date]")[0]; 
    var begin_date_m = begin_date_objm.options[begin_date_objm.selectedIndex].value; 
    begin_date =begin_date+" "+begin_date_h+":"+begin_date_m;
    begin_date=new Date(begin_date).getTime();

    var end_date = $('payend_date').get('value');
    var payend_date_objh =document.getElementsByName("_DTIME_[H][payend_date]")[0]; 
    var end_date_h = payend_date_objh.options[payend_date_objh.selectedIndex].value; 
    var payend_date_objm =document.getElementsByName("_DTIME_[M][payend_date]")[0]; 
    var end_date_m = payend_date_objm.options[payend_date_objm.selectedIndex].value; 
    end_date=end_date+" "+end_date_h+":"+end_date_m;
    end_date=new Date(end_date).getTime();

    var customername = $('customername').get('value');
    var dly_type = $('dlyname').get('value');
    var url = "index.php?app=omeanalysts&ctl=analysis_lmreport&act=report_logist";
    url += '&dly_type=' + dly_type + '&customername=' + customername + '&paybegin_date=' + begin_date + '&payend_date=' + end_date;
    window.open(url);
});
</script>
<div class="tableform"> 
<h3>快递费用报表</h3>

<form id="Searchform" action="index.php?app=omeanalysts&ctl=analysis_lmreport&act=logist_cost" method="post">
    <div class="division">
        <table width='100%' cellspacing="0" cellpadding="0" >
            <tr>
                <td>
                客户：
     <select name="customername" id="customername">
      <option value="">全部</option>
      <{foreach from=$customername key=key item=val}>
      <option value="<{$val.customername}>" <{if $val.customername==$clearingtable.customername}>selected<{/if}> ><{$val.customername}></option>
      <{/foreach}>
     </select>
                </td>
            </tr>
           <tr>
                <td>
               快递公司：
                <select name="dlyname" id="dlyname">
                 <option value="">全部</option>
                 <{foreach from=$dlyname key=key item=val}>
                 <option value="<{$val.name}>" <{if $val.name==$clearingtable.name}>selected<{/if}> ><{$val.name}></option>
                 <{/foreach}>
                </select>
                </td>
            </tr>
            <tr>
                <td>
      <option value="dly_num">发货时间：</option>
     </select><{input type="time" name="paybegin_date" vtype="required" id="paybegin_date" value="{$clearingtable.paybegin_date}" }>
                至：<{input type="time" value="{$clearingtable.payend_date}"  id="payend_date"  name="payend_date"}>
                <{button class="btn btn-primary" type="submit" id="saveCurrent" label="查询"}>

                <{button class="btn btn-primary" type="button" id="report" label="导出"}>
                </td>
            </tr>
        </table>
   </div>
</form>

<div class="division" id="accordion" style="width:3200px;">
        
        <table width="1000px" cellspacing="0" cellpadding="0" class="gridlist">
            <thead>
            <tr>
                <th style="width:80px;">客户简称</th>
                <th style="width:300px;">客户全称</th>
                <th style="width:100px;">快递公司</th>
                <th style="width:80px;">普通区域小于3KG</th>
                <th style="width:80px;">普通区域小于3KG金额合计</th>
                <th style="width:80px;">普通区域小于3KG预估</th>
                <th style="width:80px;">普通区域3KG~5KG</th>
                <th style="width:80px;">普通区域3KG~5KG金额合计</th>
                <th style="width:80px;">普通区域3KG~5KG预估</th>
                <th style="width:80px;">普通区域大于5KG</th>
                <th style="width:80px;">普通区域大于5KG金额合计</th>
                <th style="width:80px;">普通区域大于5KG预估</th>
                <th style="width:80px;">普通区域金额合计</th>
                <th style="width:80px;">特殊区域新疆</th>
                <th style="width:80px;">特殊区域新疆金额合计</th>
                <th style="width:80px;">特殊区域新疆预估</th>
                <th style="width:80px;">特殊区域西藏</th>
                <th style="width:80px;">特殊区域西藏金额合计</th>
                <th style="width:80px;">特殊区域西藏预估</th>
                <th style="width:80px;">特殊区域内蒙</th>
                <th style="width:80px;">特殊区域内蒙金额合计</th>
                <th style="width:80px;">特殊区域内蒙预估</th>
                <th style="width:80px;">特殊区域海南</th>
                <th style="width:80px;">特殊区域海南金额合计</th>
                <th style="width:80px;">特殊区域海南预估</th>
                <th style="width:80px;">特殊区域合计</th>
                <th style="width:80px;">合计</th>
            </tr>
            </thead>

              <{foreach from=$comp_data item=his}>
              <tbody>
                <tr>
                  <td><{$his.shortname}></td>
                  <td><{$his.customername}></td>
                  <td><{$his.logi_name}></td>
                  <td><{$his.weight_lthan3}></td>
                  <td><{$his.cost_lthan3}></td>
                  <td><{$his.delivery_cost_expect_lthan3}></td>
                  <td><{$his.weight_lthan5}></td>
                  <td><{$his.cost_lthan5}></td>
                  <td><{$his.delivery_cost_expect_lthan5}></td>
                  <td><{$his.weight_than5}></td>
                  <td><{$his.cost_than5}></td>
                  <td><{$his.delivery_cost_expect_than5}></td>
                  <td><{$his.common_cost}></td>
                  <td><{$his.weight_xinjiang}></td>
                  <td><{$his.cost_xinjiang}></td>
                  <td><{$his.delivery_cost_expect_xinjiang}></td>
                  <td><{$his.weight_neimeng}></td>
                  <td><{$his.cost_neimeng}></td>
                  <td><{$his.delivery_cost_expect_neimeng}></td>
                  <td><{$his.weight_xizang}></td>
                  <td><{$his.cost_xizang}></td>
                  <td><{$his.delivery_cost_expect_xizang}></td>
                  <td><{$his.weight_hainan}></td>
                  <td><{$his.cost_hainan}></td>
                  <td><{$his.delivery_cost_expect_hainan}></td>
                  <td><{$his.special_cost}></td>
                  <td><{$his.total_cost}></td>
                </tr>
                </tbody>
              <{/foreach}>
        </table>
   </div>
   
   <div class="division">
   </div>
 </div>
